import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/css/main.css'
import './plugins/vant.js'
import './assets/font/iconfont.css'
import './api/index.js'
// import VuePullRefresh from 'vue-pull-refresh'

Vue.config.productionTip = false

Vue.filter('dateFormat', (val) => {
  const dt = new Date(val)
  // console.log(dt)
  const y = dt.getFullYear()
  // console.log(y)
  const m = (dt.getMonth() + 1 + '').toString().padStart(2, '0')
  const d = dt.getDate().toString().padStart(2, '0')
  const h = dt.getHours().toString().padStart(2, '0')
  const mm = dt.getMinutes().toString().padStart(2, '0')
  const s = dt.getSeconds().toString().padStart(2, '0')

  return `${y}-${m}-${d} ${h}:${mm}:${s}`
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
